package com.bangyo.core.action;

import com.bangyo.core.manager.UserContext;

public class OperatorActionLogFactory
{
    private OperatorActionLogFactory()
    {
        super();
    }

    public static OperatorActionLog newOperatorActionLog()
    {
        return new OperatorActionLog();
    }

    public static void copy(OperatorActionLog target, OperatorActionLog source)
    {
        target.setOperatedDateTime(source.getOperatedDateTime());
        target.setOperatorRemoteAddress(source.getOperatorRemoteAddress());
        target.setOperatorSessionId(source.getOperatorSessionId());
        target.setOperatorUserPoin(source.getOperatorUserPoin());
    }

    public static void copy(OperatorActionLog target, UserContext context)
    {
        target.setOperatorRemoteAddress(context.getRemoteAddress());
        target.setOperatorSessionId(context.getSessionId());
        target.setOperatorUserPoin(context.getUserPoin());
    }
}
